<template>
  <div>
    <div class="evaluate">
      <div class="evaluate-top">
        <div class="evaluate-left">
            <h2 style="color:#f0c538">{{shops.score}}</h2>
        </div>
        <div class="evaluate-right"></div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { $_getGoods } from "../../api/goods";
interface IShops {
  avatar?: string;
  bulletin?: string;
  date?: Array<string>;
  deliveryPrice?: number;
  deliveryTime?: number;
  description?: string;
  id?: number;
  minPrice?: number;
  name?: string;
  pics?: Array<string>;
  score?: number;
  sellCount?: number;
}
@Component
export default class extends Vue {
  shops: IShops = {};
  async created() {
    let res = await $_getGoods();
    let { data } = res.data;
    data.score = data.score.toFixed(1);
    this.shops = data;
    console.log(this.shops);
  }
}
</script>

<style lang="scss" scoped>
.evaluate {
  padding: 20px;
  text-align: center;
}
</style>
